package com.crawler.crawler.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.crawler.crawler.domain.BooksAibooks;
import com.crawler.crawler.service.IBooksAibooksService;

/**
 * AibooksController
 * 
 * @author XUEH
 * @date 2020-10-14
 */
@Controller
@RequestMapping("/aibooks")
public class BooksAibooksController
{
    private String prefix = "aibooks/aibooks";

    @Autowired
    private IBooksAibooksService booksAibooksService;


    @GetMapping()
    public String aibooks()
    {
        return prefix + "/aibooks";
    }

    /**
     * 查询Aibooks列表
     */



    @GetMapping( "/crawl")
    public String crawl(BooksAibooks booksAibooks){
        booksAibooksService.crawl();
        return "index";
    }
}
